class PersonB extends Thread{
    Book bank;
    int money;

    public PersonB(Book bank, int money) {
        this.bank = bank;
        this.money = money;
    }


    @Override
    public void run() {
        while (Book.money >= money) {
            bank.atm(money);
            try {
                sleep(100);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

    }
}
